/*
 * XML Type:  FinancialInstitution
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.FinancialInstitution
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML FinancialInstitution(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class FinancialInstitutionImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.FinancialInstitution
{
    
    public FinancialInstitutionImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName ORG$0 = 
        new javax.xml.namespace.QName("", "ORG");
    private static final javax.xml.namespace.QName FID$2 = 
        new javax.xml.namespace.QName("", "FID");
    
    
    /**
     * Gets the "ORG" element
     */
    public java.lang.String getORG()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ORG$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "ORG" element
     */
    public net.ofx.types.x2003.x04.GenericNameType xgetORG()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.GenericNameType target = null;
            target = (net.ofx.types.x2003.x04.GenericNameType)get_store().find_element_user(ORG$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "ORG" element
     */
    public void setORG(java.lang.String org)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ORG$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ORG$0);
            }
            target.setStringValue(org);
        }
    }
    
    /**
     * Sets (as xml) the "ORG" element
     */
    public void xsetORG(net.ofx.types.x2003.x04.GenericNameType org)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.GenericNameType target = null;
            target = (net.ofx.types.x2003.x04.GenericNameType)get_store().find_element_user(ORG$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.GenericNameType)get_store().add_element_user(ORG$0);
            }
            target.set(org);
        }
    }
    
    /**
     * Gets the "FID" element
     */
    public java.lang.String getFID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FID$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "FID" element
     */
    public net.ofx.types.x2003.x04.FinancialInstitutionIdType xgetFID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.FinancialInstitutionIdType target = null;
            target = (net.ofx.types.x2003.x04.FinancialInstitutionIdType)get_store().find_element_user(FID$2, 0);
            return target;
        }
    }
    
    /**
     * True if has "FID" element
     */
    public boolean isSetFID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(FID$2) != 0;
        }
    }
    
    /**
     * Sets the "FID" element
     */
    public void setFID(java.lang.String fid)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FID$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(FID$2);
            }
            target.setStringValue(fid);
        }
    }
    
    /**
     * Sets (as xml) the "FID" element
     */
    public void xsetFID(net.ofx.types.x2003.x04.FinancialInstitutionIdType fid)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.FinancialInstitutionIdType target = null;
            target = (net.ofx.types.x2003.x04.FinancialInstitutionIdType)get_store().find_element_user(FID$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.FinancialInstitutionIdType)get_store().add_element_user(FID$2);
            }
            target.set(fid);
        }
    }
    
    /**
     * Unsets the "FID" element
     */
    public void unsetFID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(FID$2, 0);
        }
    }
}
